package com.example.u11.prac5;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

class ListFeatures {
    public static void main(String[] args) {
        Random random = new Random(47);
        List<Pets> pets = Pets.arrayList(7);
        System.out.println("1: "+pets);

    }

    static class Pets{
        static String[] petsIndex = new String[]{"Rat","Manx","Cymric","Mutt","Pug","Cymric","Pug"};
        public static List<Pets> arrayList(int num){
            List result = new ArrayList<Pets>();
            for (int i = 0; i < num; i++) {
                result.add(petsIndex[i]);
            }
            return result;
        }

        private String name;

        @Override
        public String toString() {
            return name;
        }
    }

    class Hamster extends Pets {
        private String name = "";
    }
}
